The impact of accounting for special methods in the measurement of object-oriented class cohesion on refactoring and fault prediction activities
نویسنده
چکیده
Class cohesion is a key attribute that is used to assess the design quality of a class, and it refers to the extent to which the attributes and methods of the class are related. Typically, classes contain special types of methods, such as constructors, destructors, and access methods. Each of these special methods has its own characteristics, which can artificially affect the class cohesion measurement. Several metrics have been proposed in the literature to indicate class cohesion during highor low-level design phases. The impact of accounting for special methods in cohesion measurement has not been addressed for most of these metrics. This paper empirically explores the impact of including or excluding special methods on cohesion measurements that were performed using 20 existing class cohesion metrics. The empirical study applies the metrics that were considered to five open-source systems under four different scenarios, including (1) considering all special methods, (2) ignoring only constructors, (3) ignoring only access methods, and (4) ignoring all special methods. This study empirically explores the impact of including special methods in cohesion measurement for two applications of interest to software practitioners, including refactoring and predicting faulty classes. The results of the empirical studies show that the cohesion values for most of the metrics considered differ significantly across the four scenarios and that this difference significantly affects the refactoring decisions, but does not significantly affect the abilities of the metrics to predict faulty classes.
منابع مشابه
Qualitative Analysis for the Impact of Accounting for Special Methods in Object-Oriented Class Cohesion Measurement
Class cohesion is a key object-oriented software quality attribute. It refers to the degree of relatedness of class attributes and methods. Several class cohesion metrics are proposed in the literature. However, the impact of considering the special methods (i.e., constructors, destructors, and access and delegation methods) in cohesion calculation is not thoroughly theoretically studied for mo...
متن کاملTheoretical Exploration for the Impact of Accounting for Special Methods in Connectivity-Based Cohesion Measurement
Class cohesion is a key object-oriented software quality attribute that is used to evaluate the degree of relatedness of class attributes and methods. Researchers have proposed several class cohesion measures. However, the effect of considering the special methods (i.e., constructors, destructors, and access and delegation methods) in cohesion calculation is not thoroughly theoretically studied...
متن کاملTheoretical Analysis of the Effect of Accounting for Special Methods in Similarity-Based Cohesion Measurement
Class cohesion is an important object-oriented software quality attributes, and it refers to the degree of relatedness of class attributes and methods. Several class cohesion measures are proposed in the literature, and the impact of considering the special methods (i.e., constructors, destructors, and access and delegation methods) in cohesion calculation is not thoroughly theoretically studie...
متن کاملImproving Object-Oriented Lack-of-Cohesion Metric by Excluding Special Methods
Classes are the basic units in object-oriented programs, and therefore, their quality has impact on the overall quality of the software. Class cohesion is a key quality factor, and it refers to the degree of relatedness of class attributes and methods. Software developers use class cohesion measure to assess the quality of their products and to guide the restructuring of poorly designed classes...
متن کاملVisual Indicator and Software Metric Formula to Determine Class Cohesion Problem and Software Design Quality
Classes is the basic unit in object oriented software, therefore their quality has significant impact on the overall quality of the software. Class cohesion is one of the important factors that determine whether the design quality of a software is good or bad. In software development it is essential for software developers to gauge the degree of cohesion; yet in software development practice, i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Journal of Systems and Software
دوره 85 شماره
صفحات -
تاریخ انتشار 2012